<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./echarts.min.js"></script>
</head>

<body>
    <div id="box" style="width:1000px;height:400px;border:1px solid black;margin:30px;auto"></div>
</body>

</html>
<script>
    let myCharts = echarts.init(document.querySelector('#box'))

    let o = {
        title: {
            text: '多个图形',
            textStyle: {
                color: 'red'
            },
            left: 'center'
        },
        xAxis: {
            type: 'category',
            // boundaryGap: false

        },
        yAxis: {
            // axisLine: {
            //     show: true
            // }
        },
        tooltip:{},
        series: [
            {
                type:'bar',
                data:[10,20,30,45,60],
                barWidth:20
            },
            {
                type:'line',
                data:[45,20,56,20,89]
            },
            {
                type:'pie',
                data:[
                    {name:'人生',value:30},
                    {name:'事业',value:50},
                    {name:'家庭',value:10},
                ],
                width:300,
                height:300,
                radius:50,
                left:700,
                top:-70,
            }
        ],
        grid: {
                left: 30,
                right: 10,
                bottom: 30
            },
    };

    myCharts.setOption(o)
</script>